import { Entity, PrimaryGeneratedColumn, Column, CreateDateColumn } from 'typeorm'

@Entity('user')
export class User {
  @PrimaryGeneratedColumn('uuid')
  _id: string

  @Column({ type: 'varchar', length: 255, unique: true })
  username: string

  @Column({ type: 'varchar', length: 255 })
  password: string

  @Column({ type: 'int' })
  role_id: number

  @Column({ type: 'int' })
  state: number

  @CreateDateColumn({ name: 'create_time', type: 'timestamp' })
  createTime: Date
}
